<script>
export default {
  name: "BaseInput",
  props: {
    value:String | Number
  },
  methods:{
    handleChange(e){
     this.$emit('input',e.target.value)
    },
    edit(){
      this.value = "hello"
    }
  }
}
</script>

<template>
<div>

  <button @click="edit">修改</button>
  <input :value="value" @input="handleChange">
</div>
</template>

<style scoped>

</style>